Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Fix context for table initialisers#434

Merged
rossberg merged 1 commit into
mainfrom
fix.433
Sep 19, 2023
Merged

Fix context for table initialisers#434
rossberg merged 1 commit into
mainfrom
fix.433

Conversation

@rossberg

Copy link
Copy Markdown
Member

Fix #433.

@titzer titzer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.

I guess the longer term solution should be to relax section order to allow some globals to be declared before tables?

@rossberg

Copy link
Copy Markdown
Member Author

Yes, absolutely. And for that to work cleanly in the future, we must not mess up the dependency order now.

I'd love to do the relaxation of section order and repetition sooner rather than later, but despite many weak use cases, we are still missing a strong one, it seems.

@rossberg rossberg merged commit 49ebc97 into main Sep 19, 2023
@rossberg rossberg deleted the fix.433 branch September 19, 2023 12:18
@eqrion

eqrion commented Sep 19, 2023

Copy link
Copy Markdown
Contributor

Yes, absolutely. And for that to work cleanly in the future, we must not mess up the dependency order now.

I'd love to do the relaxation of section order and repetition sooner rather than later, but despite many weak use cases, we are still missing a strong one, it seems.

Yeah, I was wondering if we should prototype this in SM at some point. Glancing at it though, it would require a lot of reworking and auditing of our validation/instantiation code. So it definitely needs a good motivation. That being said, if the relaxation is just a couple specific sections, that could keep the total permutations low enough to be easy.

@titzer

titzer commented Sep 19, 2023

Copy link
Copy Markdown
Contributor

Also, should it be legal to use an imported global? Imports occur before tables and thus add to the global index space, so it seems to me like this should be legal.

@rossberg

Copy link
Copy Markdown
Member Author

@titzer, that is legal, but it seems we were missing a test for that. PTAL at WebAssembly/function-references#106

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Section ordering issue in global.wast test

3 participants